home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch7q < prev    next >
Encoding:
Internet Message Format  |  1990-02-26  |  56.2 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v09i017:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch7q
  5. Message-ID: <5231@tekred.CNA.TEK.COM>
  6. Date: 24 Feb 90 01:00:09 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2193
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 9, Issue 17
  13. Archive-name: NetHack3/Patch7q
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 17 (of 30)."
  25. # Contents:  patch7.07
  26. # Wrapped by billr@saab on Wed Feb 21 10:04:38 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'patch7.07' -a "${1}" != "-c" ; then 
  29.   echo shar: Renaming existing file \"'patch7.07'\" to \"'patch7.07.orig'\"
  30.   mv -f 'patch7.07' 'patch7.07.orig'
  31. fi
  32. echo shar: Extracting \"'patch7.07'\" \(53513 characters\)
  33. sed "s/^X//" >'patch7.07' <<'END_OF_FILE'
  34. X*** src/Old/priest.c    Mon Feb 19 18:54:33 1990
  35. X--- src/priest.c    Wed Feb  7 19:57:01 1990
  36. X***************
  37. X*** 3,15 ****
  38. X  /* Copyright (c) Izchak Miller, Steve Linhart, 1989. */
  39. X  /* NetHack may be freely redistributed.  See license for details. */
  40. X  
  41. X  /* block some unused #defines to avoid overloading some cpp's */
  42. X- #define MONATTK_H
  43. X  #include "hack.h"
  44. X  #include "mfndpos.h"
  45. X  #include "eshk.h"
  46. X  #include "epri.h"
  47. X  
  48. X  /* used for the insides of shk_move and pri_move */
  49. X  int
  50. X  move_special(mtmp,monroom,appr,uondoor,avoid,omx,omy,gx,gy)
  51. X--- 3,24 ----
  52. X  /* Copyright (c) Izchak Miller, Steve Linhart, 1989. */
  53. X  /* NetHack may be freely redistributed.  See license for details. */
  54. X  
  55. X+ #define MONATTK_H    /* comment line for pre-compiled headers */
  56. X  /* block some unused #defines to avoid overloading some cpp's */
  57. X  #include "hack.h"
  58. X  #include "mfndpos.h"
  59. X  #include "eshk.h"
  60. X  #include "epri.h"
  61. X  
  62. X+ static boolean FDECL(histemple_at,(struct monst *,int,int));
  63. X+ static int FDECL(t_alignment,(struct mkroom *));
  64. X+ static boolean FDECL(is_shrined,(struct mkroom *));
  65. X+ static boolean FDECL(t_coaligned,(struct mkroom *));
  66. X+ struct monst *FDECL(findpriest,(struct mkroom *));
  67. X+ static boolean FDECL(p_inhistemple,(struct mkroom *));
  68. X+ 
  69. X+ #ifdef OVLB
  70. X+ 
  71. X  /* used for the insides of shk_move and pri_move */
  72. X  int
  73. X  move_special(mtmp,monroom,appr,uondoor,avoid,omx,omy,gx,gy)
  74. X***************
  75. X*** 42,47 ****
  76. X--- 51,61 ----
  77. X      if (tunnels(mtmp->data) &&
  78. X              (!needspick(mtmp->data) || m_carrying(mtmp, PICK_AXE)))
  79. X          allowflags |= ALLOW_DIG;
  80. X+     if (!nohands(mtmp->data) && !verysmall(mtmp->data)) {
  81. X+         allowflags |= OPENDOOR;
  82. X+         if (m_carrying(mtmp, SKELETON_KEY)) allowflags |= BUSTDOOR;
  83. X+     }
  84. X+     if (is_giant(mtmp->data)) allowflags |= BUSTDOOR;
  85. X      cnt = mfndpos(mtmp, poss, info, allowflags);
  86. X      if (allowflags & ALLOW_DIG) if(!mdig_tunnel(mtmp)) return(-2);
  87. X  
  88. X***************
  89. X*** 100,107 ****
  90. X--- 114,125 ----
  91. X      return(0);
  92. X  }
  93. X  
  94. X+ #endif /* OVLB */
  95. X+ 
  96. X  #if defined(ALTARS) && defined(THEOLOGY)
  97. X  
  98. X+ #ifdef OVL0
  99. X+ 
  100. X  struct mkroom *
  101. X  in_temple(x, y)
  102. X  register int x, y;
  103. X***************
  104. X*** 113,118 ****
  105. X--- 131,139 ----
  106. X      return(&rooms[roomno]);
  107. X  }
  108. X  
  109. X+ #endif /* OVL0 */
  110. X+ #ifdef OVLB
  111. X+ 
  112. X  static boolean
  113. X  histemple_at(priest, x, y)
  114. X  register struct monst *priest;
  115. X***************
  116. X*** 308,318 ****
  117. X--- 329,344 ----
  118. X  struct mkroom *troom;
  119. X  {
  120. X      register struct monst *mtmp;
  121. X+     extern struct monst *fdmon; /* from mon.c */
  122. X  
  123. X      for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  124. X          if(mtmp->ispriest && histemple_at(mtmp,mtmp->mx,mtmp->my)
  125. X              && &rooms[EPRI(mtmp)->shroom] == troom)
  126. X          return(mtmp);
  127. X+     for(mtmp = fdmon; mtmp; mtmp = mtmp->nmon)
  128. X+         if(mtmp->ispriest && histemple_at(mtmp,mtmp->mx,mtmp->my)
  129. X+             && &rooms[EPRI(mtmp)->shroom] == troom)
  130. X+         return(mtmp);
  131. X      return (struct monst *)0;
  132. X  }
  133. X  
  134. X***************
  135. X*** 383,392 ****
  136. X  
  137. X      /* priests don't chat unless peaceful and in their own temple */
  138. X      if(!histemple_at(priest,priest->mx,priest->my) || priest->mtame ||
  139. X!          !priest->mpeaceful || priest->mfroz || priest->msleep) {
  140. X!             if(priest->mfroz || priest->msleep) {
  141. X              kludge("%s breaks out of his reverie!", Monnam(priest));
  142. X!                 priest->mfroz = priest->msleep = 0;
  143. X          }
  144. X          /* The following is now impossible according to monst.c, */
  145. X          /* but it should stay just in case we change the latter. */
  146. X--- 409,419 ----
  147. X  
  148. X      /* priests don't chat unless peaceful and in their own temple */
  149. X      if(!histemple_at(priest,priest->mx,priest->my) || priest->mtame ||
  150. X!          !priest->mpeaceful || !priest->mcanmove || priest->msleep) {
  151. X!             if(!priest->mcanmove || priest->msleep) {
  152. X              kludge("%s breaks out of his reverie!", Monnam(priest));
  153. X!                 priest->mfrozen = priest->msleep = 0;
  154. X!         priest->mcanmove = 1;
  155. X          }
  156. X          /* The following is now impossible according to monst.c, */
  157. X          /* but it should stay just in case we change the latter. */
  158. X***************
  159. X*** 547,550 ****
  160. X--- 574,580 ----
  161. X      if(!(priest = findpriest(in_temple(u.ux, u.uy)))) return;
  162. X      wakeup(priest);
  163. X  }
  164. X+ 
  165. X+ #endif /* OVLB */
  166. X  #endif /* ALTARS && THEOLOGY */
  167. X+ 
  168. X*** src/Old/prisym.c    Mon Feb 19 18:54:59 1990
  169. X--- src/prisym.c    Mon Feb  5 18:09:58 1990
  170. X***************
  171. X*** 8,16 ****
  172. X  #include "wseg.h"
  173. X  #include "lev.h"
  174. X  
  175. X! static void FDECL(pwseg, (struct wseg *));
  176. X  #endif
  177. X  
  178. X  void
  179. X  atl(x,y,ch)
  180. X  register int x, y;
  181. X--- 8,18 ----
  182. X  #include "wseg.h"
  183. X  #include "lev.h"
  184. X  
  185. X! OSTATIC void FDECL(pwseg, (struct wseg *));
  186. X  #endif
  187. X  
  188. X+ #ifdef OVL0
  189. X+ 
  190. X  void
  191. X  atl(x,y,ch)
  192. X  register int x, y;
  193. X***************
  194. X*** 44,49 ****
  195. X--- 46,54 ----
  196. X      if(y > scrhy) scrhy = y;
  197. X  }
  198. X  
  199. X+ #endif /* OVL0 */
  200. X+ #ifdef OVL2
  201. X+ 
  202. X  /* call: (x,y) - display
  203. X      (-1,0) - close (leave last symbol)
  204. X      (-1,-1)- close (undo last symbol)
  205. X***************
  206. X*** 161,166 ****
  207. X--- 166,174 ----
  208. X      }
  209. X  }
  210. X  
  211. X+ #endif /* OVL2 */
  212. X+ #ifdef OVL1
  213. X+ 
  214. X  void
  215. X  curs_on_u()
  216. X  {
  217. X***************
  218. X*** 196,201 ****
  219. X--- 204,212 ----
  220. X      levl[u.ux][u.uy].seen = 1;
  221. X  }
  222. X  
  223. X+ #endif /* OVL1 */
  224. X+ #ifdef OVL0
  225. X+ 
  226. X  /* print a position that is visible for @ */
  227. X  void
  228. X  prl(x,y)
  229. X***************
  230. X*** 423,428 ****
  231. X--- 434,442 ----
  232. X      atl(x,y,(char)news0(x,y));
  233. X  }
  234. X  
  235. X+ #endif /* OVL0 */
  236. X+ #ifdef OVLB
  237. X+ 
  238. X  /* used with wand of digging (or pick-axe): fill scrsym and force display */
  239. X  /* also when a POOL evaporates */
  240. X  void
  241. X***************
  242. X*** 442,447 ****
  243. X--- 456,464 ----
  244. X      }
  245. X  }
  246. X  
  247. X+ #endif /* OVLB */
  248. X+ #ifdef OVL1
  249. X+ 
  250. X  void
  251. X  nosee(x,y)
  252. X  register int x, y;
  253. X***************
  254. X*** 450,456 ****
  255. X  
  256. X      if(!isok(x,y)) return;
  257. X      room = &levl[x][y];
  258. X!     if(IS_FLOOR(levl[x][y].typ)
  259. X         && !room->lit && !Blind) {
  260. X          room->scrsym = STONE_SYM;    /* was ' ' -- OIS */
  261. X          room->new = 1;
  262. X--- 467,473 ----
  263. X  
  264. X      if(!isok(x,y)) return;
  265. X      room = &levl[x][y];
  266. X!     if(levl[x][y].scrsym == ROOM_SYM
  267. X         && !room->lit && !Blind) {
  268. X          room->scrsym = STONE_SYM;    /* was ' ' -- OIS */
  269. X          room->new = 1;
  270. X***************
  271. X*** 515,520 ****
  272. X--- 532,540 ----
  273. X      return(0);
  274. X  }
  275. X  
  276. X+ #endif /* OVL1 */
  277. X+ #ifdef OVLB
  278. X+ 
  279. X  #ifdef NEWSCR
  280. X  void
  281. X  pobj(obj)
  282. X***************
  283. X*** 553,559 ****
  284. X  }
  285. X  
  286. X  #ifdef WORM
  287. X! static void
  288. X  pwseg(wtmp)
  289. X  register struct wseg *wtmp;
  290. X  {
  291. X--- 573,579 ----
  292. X  }
  293. X  
  294. X  #ifdef WORM
  295. X! XSTATIC void
  296. X  pwseg(wtmp)
  297. X  register struct wseg *wtmp;
  298. X  {
  299. X***************
  300. X*** 590,601 ****
  301. X      return(typ == DOOR);
  302. X  }
  303. X  
  304. X- boolean IS_FLOOR(typ)
  305. X- unsigned typ;
  306. X- {
  307. X-     return(typ == ROOM);
  308. X- }
  309. X- 
  310. X  boolean ACCESSIBLE(typ)
  311. X  unsigned typ;
  312. X  {
  313. X--- 610,615 ----
  314. X***************
  315. X*** 662,664 ****
  316. X--- 676,680 ----
  317. X      return(typ >= STAIRS && typ <= ALTAR);
  318. X  }
  319. X  #endif /* STUPID_CPP */
  320. X+ 
  321. X+ #endif /* OVLB */
  322. X*** src/Old/read.c    Mon Feb 19 18:55:26 1990
  323. X--- src/read.c    Mon Feb  5 18:10:02 1990
  324. X***************
  325. X*** 4,9 ****
  326. X--- 4,11 ----
  327. X  
  328. X  #include "hack.h"
  329. X  
  330. X+ #ifdef OVLB
  331. X+ 
  332. X  boolean    known;
  333. X  
  334. X  static const char readable[] = { '#', SCROLL_SYM,
  335. X***************
  336. X*** 12,19 ****
  337. X  #endif
  338. X      0 };
  339. X  
  340. X  static void FDECL(explode, (struct obj *));
  341. X! static void do_class_genocide();
  342. X  
  343. X  int
  344. X  doread() {
  345. X--- 14,31 ----
  346. X  #endif
  347. X      0 };
  348. X  
  349. X+ #endif /* OVLB */
  350. X+ 
  351. X  static void FDECL(explode, (struct obj *));
  352. X! static void NDECL(do_class_genocide);
  353. X! static void FDECL(stripspe,(struct obj *));
  354. X! static void FDECL(p_glow1,(struct obj *));
  355. X! static void FDECL(p_glow2,(struct obj *,const char *));
  356. X! static void FDECL(recharge,(struct obj *,int));
  357. X! static void FDECL(forget,(BOOLEAN_P));
  358. X! OSTATIC void FDECL(show_map_spot,(int,int));
  359. X! 
  360. X! #ifdef OVLB
  361. X  
  362. X  int
  363. X  doread() {
  364. X***************
  365. X*** 118,129 ****
  366. X  static void
  367. X  p_glow2(otmp,color)
  368. X  register struct obj    *otmp;
  369. X! register char *color;
  370. X  {
  371. X      Your("%s %s%s for a moment.",
  372. X          xname(otmp),
  373. X          Blind ? "vibrates" : "glows ",
  374. X!         Blind ? "" : Hallucination ? hcolor() : color);
  375. X  }
  376. X  
  377. X  /*
  378. X--- 130,141 ----
  379. X  static void
  380. X  p_glow2(otmp,color)
  381. X  register struct obj    *otmp;
  382. X! register const char *color;
  383. X  {
  384. X      Your("%s %s%s for a moment.",
  385. X          xname(otmp),
  386. X          Blind ? "vibrates" : "glows ",
  387. X!         Blind ? (const char *)"" : Hallucination ? hcolor() : color);
  388. X  }
  389. X  
  390. X  /*
  391. X***************
  392. X*** 137,166 ****
  393. X  int curse_bless;
  394. X  {
  395. X      register int n;
  396. X!     boolean cursed, blessed;
  397. X  
  398. X!     cursed = curse_bless < 0;
  399. X!     blessed = curse_bless > 0;
  400. X  
  401. X      if (obj->olet != WAND_SYM) {
  402. X          switch(obj->otyp) {
  403. X          case MAGIC_MARKER:
  404. X!         if (cursed) stripspe(obj);
  405. X!         else if (blessed) {
  406. X              n = obj->spe;
  407. X              if (n < 50) obj->spe = 50;
  408. X              if (n >= 50 && n < 75) obj->spe = 75;
  409. X              if (n >= 75) obj->spe += 10;
  410. X              p_glow2(obj,blue);
  411. X          } else {
  412. X              if (obj->spe < 50) obj->spe = 50;
  413. X              else obj->spe++;
  414. X              p_glow2(obj,white);
  415. X          }
  416. X          break;
  417. X          case LAMP:
  418. X!         if (cursed) stripspe(obj);
  419. X!         else if (blessed) {
  420. X              n = rn2(11);
  421. X              if (obj->spe < n) obj->spe = n;
  422. X              else obj->spe += rnd(3);
  423. X--- 149,186 ----
  424. X  int curse_bless;
  425. X  {
  426. X      register int n;
  427. X!     boolean is_cursed, is_blessed;
  428. X  
  429. X!     is_cursed = curse_bless < 0;
  430. X!     is_blessed = curse_bless > 0;
  431. X  
  432. X      if (obj->olet != WAND_SYM) {
  433. X          switch(obj->otyp) {
  434. X          case MAGIC_MARKER:
  435. X!         if (is_cursed) stripspe(obj);
  436. X!         else if (obj->recharged) {
  437. X!             if (obj->spe < 3)
  438. X!             Your("marker seems permanently dried out.");
  439. X!             else
  440. X!             pline(nothing_happens);
  441. X!         }
  442. X!         else if (is_blessed) {
  443. X              n = obj->spe;
  444. X              if (n < 50) obj->spe = 50;
  445. X              if (n >= 50 && n < 75) obj->spe = 75;
  446. X              if (n >= 75) obj->spe += 10;
  447. X              p_glow2(obj,blue);
  448. X+             obj->recharged = 1;
  449. X          } else {
  450. X              if (obj->spe < 50) obj->spe = 50;
  451. X              else obj->spe++;
  452. X              p_glow2(obj,white);
  453. X+             obj->recharged = 1;
  454. X          }
  455. X          break;
  456. X          case LAMP:
  457. X!         if (is_cursed) stripspe(obj);
  458. X!         else if (is_blessed) {
  459. X              n = rn2(11);
  460. X              if (obj->spe < n) obj->spe = n;
  461. X              else obj->spe += rnd(3);
  462. X***************
  463. X*** 171,178 ****
  464. X          }
  465. X          break;
  466. X          case MAGIC_LAMP:
  467. X!         if (cursed) stripspe(obj);
  468. X!         else if (blessed > 0) {
  469. X              if (obj->spe == 1 || obj->recharged)
  470. X              pline(nothing_happens);
  471. X              else {
  472. X--- 191,198 ----
  473. X          }
  474. X          break;
  475. X          case MAGIC_LAMP:
  476. X!         if (is_cursed) stripspe(obj);
  477. X!         else if (is_blessed > 0) {
  478. X              if (obj->spe == 1 || obj->recharged)
  479. X              pline(nothing_happens);
  480. X              else {
  481. X***************
  482. X*** 194,201 ****
  483. X          }
  484. X          break;
  485. X          case CRYSTAL_BALL:
  486. X!         if (cursed) stripspe(obj);
  487. X!         else if (blessed) {
  488. X              obj->spe = 6;
  489. X              p_glow2(obj,blue);
  490. X          } else {
  491. X--- 214,221 ----
  492. X          }
  493. X          break;
  494. X          case CRYSTAL_BALL:
  495. X!         if (is_cursed) stripspe(obj);
  496. X!         else if (is_blessed) {
  497. X              obj->spe = 6;
  498. X              p_glow2(obj,blue);
  499. X          } else {
  500. X***************
  501. X*** 206,213 ****
  502. X          }
  503. X          break;
  504. X          case BAG_OF_TRICKS:
  505. X!         if (cursed) stripspe(obj);
  506. X!         else if (blessed) {
  507. X              if (obj->spe <= 10)
  508. X              obj->spe += (5 + rnd(10));
  509. X              else obj->spe += (5 + rnd(5));
  510. X--- 226,233 ----
  511. X          }
  512. X          break;
  513. X          case BAG_OF_TRICKS:
  514. X!         if (is_cursed) stripspe(obj);
  515. X!         else if (is_blessed) {
  516. X              if (obj->spe <= 10)
  517. X              obj->spe += (5 + rnd(10));
  518. X              else obj->spe += (5 + rnd(5));
  519. X***************
  520. X*** 228,235 ****
  521. X              explode(obj);
  522. X              return;
  523. X          }
  524. X!         if (cursed) stripspe(obj);
  525. X!         else if (blessed) {
  526. X              if (obj->spe != 3) {
  527. X              obj->spe = 3;
  528. X              p_glow2(obj,blue);
  529. X--- 248,255 ----
  530. X              explode(obj);
  531. X              return;
  532. X          }
  533. X!         if (is_cursed) stripspe(obj);
  534. X!         else if (is_blessed) {
  535. X              if (obj->spe != 3) {
  536. X              obj->spe = 3;
  537. X              p_glow2(obj,blue);
  538. X***************
  539. X*** 246,253 ****
  540. X          obj->recharged = 1; /* another recharging disallowed */
  541. X          }
  542. X          else {
  543. X!         if (cursed) stripspe(obj);
  544. X!         else if (blessed) {
  545. X              if (objects[obj->otyp].bits & NODIR) {
  546. X              n = rn1(5,11);
  547. X              if (obj->spe < n) obj->spe = n;
  548. X--- 266,273 ----
  549. X          obj->recharged = 1; /* another recharging disallowed */
  550. X          }
  551. X          else {
  552. X!         if (is_cursed) stripspe(obj);
  553. X!         else if (is_blessed) {
  554. X              if (objects[obj->otyp].bits & NODIR) {
  555. X              n = rn1(5,11);
  556. X              if (obj->spe < n) obj->spe = n;
  557. X***************
  558. X*** 331,337 ****
  559. X                  xname(otmp),
  560. X                  sobj->cursed ? "mottled" : "shimmering",
  561. X                  Hallucination ? hcolor() :
  562. X!                   sobj->cursed ? black : "gold",
  563. X                  sobj->cursed ? "glow" :
  564. X                    (is_shield(otmp) ? "layer" : "shield"));
  565. X              if(!(sobj->cursed))
  566. X--- 351,357 ----
  567. X                  xname(otmp),
  568. X                  sobj->cursed ? "mottled" : "shimmering",
  569. X                  Hallucination ? hcolor() :
  570. X!                   sobj->cursed ? black : (const char *)"gold",
  571. X                  sobj->cursed ? "glow" :
  572. X                    (is_shield(otmp) ? "layer" : "shield"));
  573. X              if(!(sobj->cursed))
  574. X***************
  575. X*** 347,353 ****
  576. X          Your("%s violently %s%s for a while, then evaporates.",
  577. X                  xname(otmp),
  578. X                  Blind ? "vibrates" : "glows ",
  579. X!                 Blind ? "" : Hallucination ? hcolor() : silver);
  580. X              if(is_cloak(otmp)) (void) Cloak_off();
  581. X              if(is_boots(otmp)) (void) Boots_off();
  582. X              if(is_helmet(otmp)) (void) Helmet_off();
  583. X--- 367,373 ----
  584. X          Your("%s violently %s%s for a while, then evaporates.",
  585. X                  xname(otmp),
  586. X                  Blind ? "vibrates" : "glows ",
  587. X!                 Blind ? nul : Hallucination ? hcolor() : silver);
  588. X              if(is_cloak(otmp)) (void) Cloak_off();
  589. X              if(is_boots(otmp)) (void) Boots_off();
  590. X              if(is_helmet(otmp)) (void) Helmet_off();
  591. X***************
  592. X*** 361,367 ****
  593. X          Your("%s %s%s for a %s.",
  594. X              xname(otmp),
  595. X              Blind ? "vibrates" : "glows ",
  596. X!             Blind ? "" : Hallucination ? hcolor() :
  597. X                sobj->cursed ? black : silver,
  598. X                (s*s>1) ? "while" : "moment");
  599. X          otmp->cursed = sobj->cursed;
  600. X--- 381,387 ----
  601. X          Your("%s %s%s for a %s.",
  602. X              xname(otmp),
  603. X              Blind ? "vibrates" : "glows ",
  604. X!             Blind ? nul : Hallucination ? hcolor() :
  605. X                sobj->cursed ? black : silver,
  606. X                (s*s>1) ? "while" : "moment");
  607. X          otmp->cursed = sobj->cursed;
  608. X***************
  609. X*** 407,427 ****
  610. X              Your("%s begin to %s%s.",
  611. X                  makeplural(body_part(HAND)),
  612. X                  Blind ? "tingle" : "glow ",
  613. X!                 Blind ? "" : Hallucination ? hcolor() : purple);
  614. X              make_confused(HConfusion + rnd(100),FALSE);
  615. X              } else {
  616. X              pline("A %s%s surrounds your %s.",
  617. X!                 Blind ? "" : Hallucination ? hcolor() : red,
  618. X                  Blind ? "faint buzz" : " glow",
  619. X                  body_part(HEAD));
  620. X              make_confused(0L,TRUE);
  621. X              }
  622. X          } else {
  623. X!             Your("%s%s %s.",
  624. X              makeplural(body_part(HAND)),
  625. X              Blind ? "" : " begin to glow",
  626. X!             Blind ? "tingle" : Hallucination ? hcolor() : red);
  627. X!             u.umconf = 1;
  628. X          }
  629. X          break;
  630. X      case SCR_SCARE_MONSTER:
  631. X--- 427,461 ----
  632. X              Your("%s begin to %s%s.",
  633. X                  makeplural(body_part(HAND)),
  634. X                  Blind ? "tingle" : "glow ",
  635. X!                 Blind ? nul : Hallucination ? hcolor() : purple);
  636. X              make_confused(HConfusion + rnd(100),FALSE);
  637. X              } else {
  638. X              pline("A %s%s surrounds your %s.",
  639. X!                 Blind ? nul : Hallucination ? hcolor() : red,
  640. X                  Blind ? "faint buzz" : " glow",
  641. X                  body_part(HEAD));
  642. X              make_confused(0L,TRUE);
  643. X              }
  644. X          } else {
  645. X!             if (!sobj->blessed) {
  646. X!             Your("%s%s %s%s.",
  647. X              makeplural(body_part(HAND)),
  648. X              Blind ? "" : " begin to glow",
  649. X!             Blind ? (const char *)"tingle" : Hallucination ? hcolor() : red,
  650. X!             u.umconf ? " even more" : "");
  651. X!             u.umconf++;
  652. X!             } else {
  653. X!             if (Blind)
  654. X!                 Your("%s tingle %s sharply.",
  655. X!                 makeplural(body_part(HAND)),
  656. X!                 u.umconf ? "even more" : "very");
  657. X!             else
  658. X!                 Your("%s glow a%s brilliant %s.",
  659. X!                 makeplural(body_part(HAND)),
  660. X!                 u.umconf ? "n even more" : "",
  661. X!                 Hallucination ? hcolor() : red);
  662. X!             u.umconf += (1 + rnd(8));
  663. X!             }
  664. X          }
  665. X          break;
  666. X      case SCR_SCARE_MONSTER:
  667. X***************
  668. X*** 433,441 ****
  669. X  
  670. X          for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  671. X              if(cansee(mtmp->mx,mtmp->my)) {
  672. X!             if(confused || sobj->cursed)
  673. X!                 mtmp->mflee = mtmp->mfroz = mtmp->msleep = 0;
  674. X!             else
  675. X                  if (! resist(mtmp, sobj->olet, 0, NOTELL))
  676. X                  mtmp->mflee = 1;
  677. X              if(!mtmp->mtame) ct++;    /* pets don't laugh at you */
  678. X--- 467,476 ----
  679. X  
  680. X          for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  681. X              if(cansee(mtmp->mx,mtmp->my)) {
  682. X!             if(confused || sobj->cursed) {
  683. X!                 mtmp->mflee = mtmp->mfrozen = mtmp->msleep = 0;
  684. X!                 mtmp->mcanmove = 1;
  685. X!             } else
  686. X                  if (! resist(mtmp, sobj->olet, 0, NOTELL))
  687. X                  mtmp->mflee = 1;
  688. X              if(!mtmp->mtame) ct++;    /* pets don't laugh at you */
  689. X***************
  690. X*** 512,519 ****
  691. X          }
  692. X  /*        break;    /*NOTREACHED*/
  693. X      case SCR_ENCHANT_WEAPON:
  694. X!         if(uwep && (uwep->olet == WEAPON_SYM || uwep->otyp == PICK_AXE)
  695. X!                             && confused) {
  696. X          /* olet check added 10/25/86 GAN */
  697. X                          uwep->rustfree = !(sobj->cursed);
  698. X              if(Blind)
  699. X--- 547,554 ----
  700. X          }
  701. X  /*        break;    /*NOTREACHED*/
  702. X      case SCR_ENCHANT_WEAPON:
  703. X!         if(uwep && (uwep->olet == WEAPON_SYM || uwep->otyp == PICK_AXE
  704. X!             || uwep->otyp == UNICORN_HORN) && confused) {
  705. X          /* olet check added 10/25/86 GAN */
  706. X                          uwep->rustfree = !(sobj->cursed);
  707. X              if(Blind)
  708. X***************
  709. X*** 523,529 ****
  710. X                  aobjnam(uwep, "are"),
  711. X                  sobj->cursed ? "mottled" : "shimmering",
  712. X                  Hallucination ? hcolor() :
  713. X!                   sobj->cursed ? purple : "gold",
  714. X                  sobj->cursed ? "glow" : "shield");
  715. X          } else return !chwepon(sobj, bcsign(sobj)*2+1);
  716. X          break;
  717. X--- 558,564 ----
  718. X                  aobjnam(uwep, "are"),
  719. X                  sobj->cursed ? "mottled" : "shimmering",
  720. X                  Hallucination ? hcolor() :
  721. X!                   sobj->cursed ? purple : (const char *)"gold",
  722. X                  sobj->cursed ? "glow" : "shield");
  723. X          } else return !chwepon(sobj, bcsign(sobj)*2+1);
  724. X          break;
  725. X***************
  726. X*** 571,578 ****
  727. X--- 606,619 ----
  728. X  
  729. X              if (sobj->blessed && !Teleport_control) {
  730. X                  known = TRUE;
  731. X+ #ifndef MACOS
  732. X                  pline("Do you wish to teleport? ");
  733. X                  if (yn()=='n') break;
  734. X+ #else
  735. X+                 if(!flags.silent) SysBeep(1);
  736. X+                 if(UseMacAlertText(128, "Do you wish to teleport ?") == 2)
  737. X+                     break;
  738. X+ #endif
  739. X              }
  740. X              tele();
  741. X              if(uroom != inroom(u.ux, u.uy)) known = TRUE;
  742. X***************
  743. X*** 589,594 ****
  744. X--- 630,640 ----
  745. X          if (food_detect(sobj))
  746. X              return(1);    /* nothing detected */
  747. X          break;
  748. X+ #ifdef SPELLS
  749. X+     case SPE_IDENTIFY:
  750. X+         cval = rn2(5);
  751. X+         goto id;
  752. X+ #endif
  753. X      case SCR_IDENTIFY:
  754. X          /* known = TRUE; */
  755. X          if(confused)
  756. X***************
  757. X*** 602,608 ****
  758. X          useup(sobj);
  759. X          makeknown(SCR_IDENTIFY);
  760. X  #ifdef SPELLS
  761. X!     case SPE_IDENTIFY:
  762. X  #endif
  763. X          if(!confused)
  764. X              while(invent && !ggetobj("identify", identify, cval));
  765. X--- 648,654 ----
  766. X          useup(sobj);
  767. X          makeknown(SCR_IDENTIFY);
  768. X  #ifdef SPELLS
  769. X!     id:
  770. X  #endif
  771. X          if(!confused)
  772. X              while(invent && !ggetobj("identify", identify, cval));
  773. X***************
  774. X*** 665,671 ****
  775. X              } else {
  776. X              pline("The scroll catches fire and you burn your %s.",
  777. X                  makeplural(body_part(HAND)));
  778. X!             losehp(1, "scroll of fire");
  779. X              }
  780. X              return(1);
  781. X          }
  782. X--- 711,717 ----
  783. X              } else {
  784. X              pline("The scroll catches fire and you burn your %s.",
  785. X                  makeplural(body_part(HAND)));
  786. X!             losehp(1, "scroll of fire", KILLED_BY_AN);
  787. X              }
  788. X              return(1);
  789. X          }
  790. X***************
  791. X*** 676,682 ****
  792. X              You("are uninjured.");
  793. X          } else {
  794. X              u.uhpmax -= num;
  795. X!             losehp(num, "scroll of fire");
  796. X          }
  797. X          destroy_item(SCROLL_SYM, AD_FIRE);
  798. X  #ifdef SPELLS
  799. X--- 722,728 ----
  800. X              You("are uninjured.");
  801. X          } else {
  802. X              u.uhpmax -= num;
  803. X!             losehp(num, "scroll of fire", KILLED_BY_AN);
  804. X          }
  805. X          destroy_item(SCROLL_SYM, AD_FIRE);
  806. X  #ifdef SPELLS
  807. X***************
  808. X*** 689,697 ****
  809. X              if(dist(mtmp->mx,mtmp->my) < 3) {
  810. X              if (resists_fire(mtmp->data)) continue;
  811. X              if (u.uswallow) {
  812. X!                 if (mtmp != u.ustuck) continue;
  813. X!                 pline("%s gets heartburn.", Monnam(u.ustuck));
  814. X!                 num *= 2;
  815. X              }
  816. X              mtmp->mhp -= num;        /* No saving throw! */
  817. X              if(resists_cold(mtmp->data))
  818. X--- 735,748 ----
  819. X              if(dist(mtmp->mx,mtmp->my) < 3) {
  820. X              if (resists_fire(mtmp->data)) continue;
  821. X              if (u.uswallow) {
  822. X!                 if (mtmp != u.ustuck) continue;
  823. X!                 if (is_animal(u.ustuck->data))
  824. X!                     pline("%s gets heartburn.", 
  825. X!                           Monnam(u.ustuck));
  826. X!                 else
  827. X!                     You("toast %s slightly.", 
  828. X!                         Monnam(u.ustuck)); 
  829. X!                 num *= 2;
  830. X              }
  831. X              mtmp->mhp -= num;        /* No saving throw! */
  832. X              if(resists_cold(mtmp->data))
  833. X***************
  834. X*** 724,730 ****
  835. X  {
  836. X      Your("%s vibrates violently, and explodes!",xname(obj));
  837. X      bell();
  838. X!     losehp(rn2(2*(u.uhpmax+1)/3),"exploding wand");
  839. X      useup(obj);
  840. X  }
  841. X  
  842. X--- 775,781 ----
  843. X  {
  844. X      Your("%s vibrates violently, and explodes!",xname(obj));
  845. X      bell();
  846. X!     losehp(rn2(2*(u.uhpmax+1)/3),"exploding wand", KILLED_BY_AN);
  847. X      useup(obj);
  848. X  }
  849. X  
  850. X***************
  851. X*** 745,751 ****
  852. X              pline("It suddenly becomes dark in here.");
  853. X      } else {
  854. X          if(u.uswallow){
  855. X!             pline("%s's stomach is lit.", Monnam(u.ustuck));
  856. X              return;
  857. X          }
  858. X          if(is_maze_lev){
  859. X--- 796,809 ----
  860. X              pline("It suddenly becomes dark in here.");
  861. X      } else {
  862. X          if(u.uswallow){
  863. X!             if (is_animal(u.ustuck->data))
  864. X!                 pline("%s's stomach is lit.", Monnam(u.ustuck));
  865. X!             else
  866. X!                 if (is_whirly(u.ustuck->data))
  867. X!                     pline("%s shines briefly.", 
  868. X!                           Monnam(u.ustuck));
  869. X!                 else
  870. X!                     pline("%s glistens.", Monnam(u.ustuck));
  871. X              return;
  872. X          }
  873. X          if(is_maze_lev){
  874. X***************
  875. X*** 829,834 ****
  876. X--- 887,893 ----
  877. X                  pline("Wiped out all %s.", n);
  878. X                  if (&mons[i] == player_mon()) {
  879. X                  u.uhp = -1;
  880. X+                 killer_format = KILLED_BY_AN;
  881. X                  killer = "scroll of genocide";
  882. X  #ifdef POLYSELF
  883. X                  if (u.umonnum >= 0)
  884. X***************
  885. X*** 935,940 ****
  886. X--- 994,1000 ----
  887. X          pline("Wiped out all %s.", makeplural(buf));
  888. X          if(killplayer) {
  889. X          u.uhp = -1;
  890. X+         killer_format = KILLED_BY_AN;
  891. X          killer = "genocide spell";
  892. X  #ifdef POLYSELF
  893. X      /* A polymorphed character will die as soon as he is rehumanized. */
  894. X***************
  895. X*** 961,967 ****
  896. X      }
  897. X  }
  898. X  
  899. X! static void
  900. X  show_map_spot(x, y)
  901. X  register int x, y;
  902. X  {
  903. X--- 1021,1030 ----
  904. X      }
  905. X  }
  906. X  
  907. X! #endif /* OVLB */
  908. X! #ifdef OVL0
  909. X! 
  910. X! XSTATIC void
  911. X  show_map_spot(x, y)
  912. X  register int x, y;
  913. X  {
  914. X***************
  915. X*** 998,1003 ****
  916. X--- 1061,1069 ----
  917. X          show_map_spot(zx, zy);
  918. X  }
  919. X  
  920. X+ #endif /* OVL0 */
  921. X+ #ifdef OVLB
  922. X+ 
  923. X  void
  924. X  do_vicinity_map() {
  925. X      register int zx, zy;
  926. X***************
  927. X*** 1065,1071 ****
  928. X          return(1);
  929. X      } else if(!ct) {
  930. X          known = TRUE;
  931. X!         You("%s %s close nearby.", sobj ? "smell" : "sense",
  932. X              confused ? "something" : "food");
  933. X      } else {
  934. X          known = TRUE;
  935. X--- 1131,1137 ----
  936. X          return(1);
  937. X      } else if(!ct) {
  938. X          known = TRUE;
  939. X!         You("%s %s nearby.", sobj ? "smell" : "sense",
  940. X              confused ? "something" : "food");
  941. X      } else {
  942. X          known = TRUE;
  943. X***************
  944. X*** 1136,1149 ****
  945. X  create_particular()
  946. X  {
  947. X      char buf[BUFSZ];
  948. X!     int which;
  949. X  
  950. X      do {
  951. X          pline("Create what kind of monster? [type the name] ");
  952. X          getlin(buf);
  953. X!     } while(strlen(buf) < 1);
  954. X!     which = name_to_mon(buf);
  955. X!     if (which != -1) {
  956. X          if (!(mons[which].geno & G_GENOD) && cant_create(&which) &&
  957. X                                  !Blind) {
  958. X          if (mons[which].geno & G_GENOD)
  959. X--- 1202,1218 ----
  960. X  create_particular()
  961. X  {
  962. X      char buf[BUFSZ];
  963. X!     int which, tries = 0;
  964. X  
  965. X      do {
  966. X          pline("Create what kind of monster? [type the name] ");
  967. X          getlin(buf);
  968. X!         which = name_to_mon(buf);
  969. X!         if (which < 0) pline("I've never heard of such monsters.");
  970. X!         else break;
  971. X!     } while (++tries < 5);
  972. X!     if (tries == 5) pline(thats_enough_tries);
  973. X!     else {
  974. X          if (!(mons[which].geno & G_GENOD) && cant_create(&which) &&
  975. X                                  !Blind) {
  976. X          if (mons[which].geno & G_GENOD)
  977. X***************
  978. X*** 1157,1159 ****
  979. X--- 1226,1230 ----
  980. X      return FALSE;
  981. X  }
  982. X  #endif /* WIZARD || EXPLORE_MODE */
  983. X+ 
  984. X+ #endif /* OVLB */
  985. X*** src/Old/restore.c    Mon Feb 19 18:56:14 1990
  986. X--- src/restore.c    Fri Feb 16 19:06:29 1990
  987. X***************
  988. X*** 99,105 ****
  989. X      register struct fruit *oldf;
  990. X  #endif
  991. X      int xl;
  992. X! #ifdef LINT
  993. X      /* suppress "used before set" warning from lint */
  994. X      otmp2 = 0;
  995. X  #endif
  996. X--- 99,105 ----
  997. X      register struct fruit *oldf;
  998. X  #endif
  999. X      int xl;
  1000. X! #if defined(LINT) || defined(__GNULINT__)
  1001. X      /* suppress "used before set" warning from lint */
  1002. X      otmp2 = 0;
  1003. X  #endif
  1004. X***************
  1005. X*** 148,160 ****
  1006. X      off_t differ;
  1007. X  
  1008. X      mread(fd, (genericptr_t)&monbegin, sizeof(monbegin));
  1009. X! #if !defined(MSDOS) && !defined(M_XENIX) && !defined(THINKC4)
  1010. X      differ = (genericptr_t)(&mons[0]) - (genericptr_t)(monbegin);
  1011. X  #else
  1012. X      differ = (long)(&mons[0]) - (long)(monbegin);
  1013. X  #endif
  1014. X  
  1015. X! #ifdef LINT
  1016. X      /* suppress "used before set" warning from lint */
  1017. X      mtmp2 = 0;
  1018. X  #endif
  1019. X--- 148,160 ----
  1020. X      off_t differ;
  1021. X  
  1022. X      mread(fd, (genericptr_t)&monbegin, sizeof(monbegin));
  1023. X! #if !defined(MSDOS) && !defined(M_XENIX) && !defined(THINKC4) && !defined(HPUX)
  1024. X      differ = (genericptr_t)(&mons[0]) - (genericptr_t)(monbegin);
  1025. X  #else
  1026. X      differ = (long)(&mons[0]) - (long)(monbegin);
  1027. X  #endif
  1028. X  
  1029. X! #if defined(LINT) || defined(__GNULINT__)
  1030. X      /* suppress "used before set" warning from lint */
  1031. X      mtmp2 = 0;
  1032. X  #endif
  1033. X***************
  1034. X*** 167,173 ****
  1035. X          mread(fd, (genericptr_t) mtmp, (unsigned) xl + sizeof(struct monst));
  1036. X          if(!mtmp->m_id)
  1037. X              mtmp->m_id = flags.ident++;
  1038. X! #if !defined(MSDOS) && !defined(M_XENIX) && !defined(THINKC4)
  1039. X          /* ANSI type for differ is ptrdiff_t --
  1040. X           * long may be wrong for segmented architecture --
  1041. X           * may be better to cast pointers to (struct permonst *)
  1042. X--- 167,173 ----
  1043. X          mread(fd, (genericptr_t) mtmp, (unsigned) xl + sizeof(struct monst));
  1044. X          if(!mtmp->m_id)
  1045. X              mtmp->m_id = flags.ident++;
  1046. X! #if !defined(MSDOS) && !defined(M_XENIX) && !defined(THINKC4) && !defined(HPUX)
  1047. X          /* ANSI type for differ is ptrdiff_t --
  1048. X           * long may be wrong for segmented architecture --
  1049. X           * may be better to cast pointers to (struct permonst *)
  1050. X***************
  1051. X*** 241,246 ****
  1052. X--- 241,249 ----
  1053. X          if(tmp != getuid()) {        /* strange ... */
  1054. X          (void) close(fd);
  1055. X          (void) unlink(SAVEF);
  1056. X+ #ifdef AMIGA_WBENCH
  1057. X+         ami_wbench_unlink(SAVEF);
  1058. X+ #endif
  1059. X          (void) puts("Saved game was not yours.");
  1060. X          restoring = FALSE;
  1061. X          return(0);
  1062. X***************
  1063. X*** 286,293 ****
  1064. X  #endif
  1065. X      mread(fd, (genericptr_t) &is_maze_lev, sizeof is_maze_lev);
  1066. X      mread(fd, (genericptr_t) &u, sizeof(struct you));
  1067. X  #ifdef SPELLS
  1068. X!     mread(fd, (genericptr_t) spl_book, sizeof(struct spell) * (MAXSPELL + 1));
  1069. X  #endif
  1070. X      if(u.ustuck)
  1071. X          mread(fd, (genericptr_t) &mid, sizeof mid);
  1072. X--- 289,311 ----
  1073. X  #endif
  1074. X      mread(fd, (genericptr_t) &is_maze_lev, sizeof is_maze_lev);
  1075. X      mread(fd, (genericptr_t) &u, sizeof(struct you));
  1076. X+     if(u.uhp <= 0) {
  1077. X+         (void) close(fd);
  1078. X+         (void) unlink(SAVEF);
  1079. X+ #ifdef AMIGA_WBENCH
  1080. X+         ami_wbench_unlink(SAVEF);
  1081. X+ #endif
  1082. X+         (void) puts("You were not healthy enough to survive restoration.");
  1083. X+         restoring = FALSE;
  1084. X+         return(0);
  1085. X+     }
  1086. X  #ifdef SPELLS
  1087. X!     mread(fd, (genericptr_t) spl_book, 
  1088. X!                 sizeof(struct spell) * (MAXSPELL + 1));
  1089. X! #endif
  1090. X! #ifdef NAMED_ITEMS
  1091. X!     mread(fd, (genericptr_t) artiexist, 
  1092. X!             (unsigned int)(sizeof(boolean) * artifact_num));
  1093. X  #endif
  1094. X      if(u.ustuck)
  1095. X          mread(fd, (genericptr_t) &mid, sizeof mid);
  1096. X***************
  1097. X*** 349,358 ****
  1098. X              
  1099. X              if (er = Create(&fileName, 0, CREATOR, LEVEL_TYPE))
  1100. X                  SysBeep(1);
  1101. X!             else {
  1102. X!                 msmsg(".");
  1103. X!                 nfd = open(lock, O_WRONLY | O_BINARY);
  1104. X!             }
  1105. X              (void)SetVol(0L, oldVolume);
  1106. X          }
  1107. X  # else
  1108. X--- 367,374 ----
  1109. X              
  1110. X              if (er = Create(&fileName, 0, CREATOR, LEVEL_TYPE))
  1111. X                  SysBeep(1);
  1112. X!             msmsg(".");
  1113. X!             nfd = open(lock, O_WRONLY | O_BINARY);
  1114. X              (void)SetVol(0L, oldVolume);
  1115. X          }
  1116. X  # else
  1117. X***************
  1118. X*** 360,366 ****
  1119. X  # endif /* MACOS */
  1120. X  #endif
  1121. X          if (nfd < 0)    panic("Cannot open temp file %s!\n", lock);
  1122. X! #if defined(DGK) && !defined(OLD_TOS)
  1123. X          if (!savelev(nfd, ltmp, COUNT | WRITE)) {
  1124. X  
  1125. X              /* The savelev can't proceed because the size required
  1126. X--- 376,382 ----
  1127. X  # endif /* MACOS */
  1128. X  #endif
  1129. X          if (nfd < 0)    panic("Cannot open temp file %s!\n", lock);
  1130. X! #if defined(DGK)
  1131. X          if (!savelev(nfd, ltmp, COUNT | WRITE)) {
  1132. X  
  1133. X              /* The savelev can't proceed because the size required
  1134. X***************
  1135. X*** 423,428 ****
  1136. X--- 439,447 ----
  1137. X                  )
  1138. X  #endif
  1139. X          (void) unlink(SAVEF);
  1140. X+ #ifdef AMIGA_WBENCH
  1141. X+         ami_wbench_unlink(SAVEF);
  1142. X+ #endif
  1143. X  #ifdef REINCARNATION
  1144. X      /* this can't be done earlier because we need to check the initial
  1145. X       * showsyms against the one saved in each of the non-rogue levels */
  1146. X***************
  1147. X*** 489,495 ****
  1148. X      short tlev;
  1149. X  #endif
  1150. X  
  1151. X! #if defined(MSDOS) && !defined(TOS)
  1152. X      setmode(fd, O_BINARY);        /* is this required for TOS??? NO --ERS */
  1153. X  #endif
  1154. X  #ifdef TUTTI_FRUTTI
  1155. X--- 508,514 ----
  1156. X      short tlev;
  1157. X  #endif
  1158. X  
  1159. X! #if defined(MSDOS) && !defined(TOS) && !defined(LATTICE) && !defined(AZTEC_C)
  1160. X      setmode(fd, O_BINARY);        /* is this required for TOS??? NO --ERS */
  1161. X  #endif
  1162. X  #ifdef TUTTI_FRUTTI
  1163. X***************
  1164. X*** 558,572 ****
  1165. X      mread(fd, (genericptr_t) levl, sizeof(levl));
  1166. X  #endif
  1167. X      mread(fd, (genericptr_t) osymbol, sizeof(osymbol));
  1168. X-     if (memcmp((genericptr_t) osymbol,
  1169. X-            (genericptr_t) showsyms, sizeof (showsyms))
  1170. X  #ifdef REINCARNATION
  1171. X!         && dlvl != rogue_level
  1172. X!         /* rogue level always uses default syms, and showsyms will still
  1173. X!          * have its initial value from environment when restoring a
  1174. X!          * game */
  1175. X  #endif
  1176. X-         ) {
  1177. X          for (x = 0; x < COLNO; x++)
  1178. X              for (y = 0; y < ROWNO; y++) {
  1179. X                  osym = levl[x][y].scrsym;
  1180. X--- 577,598 ----
  1181. X      mread(fd, (genericptr_t) levl, sizeof(levl));
  1182. X  #endif
  1183. X      mread(fd, (genericptr_t) osymbol, sizeof(osymbol));
  1184. X  #ifdef REINCARNATION
  1185. X!     if (memcmp((genericptr_t) osymbol, ((dlevel==rogue_level)
  1186. X!             ? (genericptr_t)savesyms : (genericptr_t)showsyms),
  1187. X!             sizeof (osymbol))
  1188. X!         && dlvl != rogue_level) {
  1189. X!         /* rogue level always uses default syms.  Although showsyms
  1190. X!          * will be properly initialized from environment when restoring
  1191. X!          * a game, this routine is called upon saving as well as
  1192. X!          * restoring; when saving on the Rogue level, showsyms will
  1193. X!          * be wrong, so use savesyms (which is always right, both on
  1194. X!          * saving and restoring).
  1195. X!          */
  1196. X! #else
  1197. X!     if (memcmp((genericptr_t) osymbol,
  1198. X!            (genericptr_t) showsyms, sizeof (showsyms))) {
  1199. X  #endif
  1200. X          for (x = 0; x < COLNO; x++)
  1201. X              for (y = 0; y < ROWNO; y++) {
  1202. X                  osym = levl[x][y].scrsym;
  1203. X***************
  1204. X*** 768,773 ****
  1205. X--- 794,807 ----
  1206. X          if (!ghostly) {
  1207. X              nhp = mtmp->mhp +
  1208. X                  (regenerates(mtmp->data) ? tmoves : tmoves/20);
  1209. X+             if(!mtmp->mcansee && mtmp->mblinded) {
  1210. X+                 if (mtmp->mblinded < tmoves) mtmp->mblinded = 0;
  1211. X+                 else mtmp->mblinded -= tmoves;
  1212. X+             }
  1213. X+             if(!mtmp->mcanmove && mtmp->mfrozen) {
  1214. X+                 if (mtmp->mfrozen < tmoves) mtmp->mfrozen = 0;
  1215. X+                 else mtmp->mfrozen -= tmoves;
  1216. X+             }
  1217. X              if(nhp > mtmp->mhpmax)
  1218. X                  mtmp->mhp = mtmp->mhpmax;
  1219. X              else
  1220. X***************
  1221. X*** 780,786 ****
  1222. X        }
  1223. X      }
  1224. X  
  1225. X-     setgd();
  1226. X      fgold = 0;
  1227. X      while(gold = newgold(),
  1228. X            mread(fd, (genericptr_t)gold, sizeof(struct gold)),
  1229. X--- 814,819 ----
  1230. X***************
  1231. X*** 915,920 ****
  1232. X--- 948,956 ----
  1233. X          pline("Read %d instead of %u bytes.\n", rlen, len);
  1234. X          if(restoring) {
  1235. X              (void) unlink(SAVEF);
  1236. X+ #ifdef AMIGA_WBENCH
  1237. X+             ami_wbench_unlink(SAVEF);
  1238. X+ #endif
  1239. X              error("Error restoring old game.");
  1240. X          }
  1241. X          panic("Error reading level file.");
  1242. X*** src/Old/rip.c    Mon Feb 19 18:56:50 1990
  1243. X--- src/rip.c    Thu Jan 25 22:16:01 1990
  1244. X***************
  1245. X*** 5,11 ****
  1246. X  #include "hack.h"
  1247. X  #include <ctype.h>
  1248. X  
  1249. X! static char *rip[] = {
  1250. X  "                       ----------",
  1251. X  "                      /          \\",
  1252. X  "                     /    REST    \\",
  1253. X--- 5,13 ----
  1254. X  #include "hack.h"
  1255. X  #include <ctype.h>
  1256. X  
  1257. X! static void FDECL(center,(int,char *));
  1258. X! 
  1259. X! static const char *rip_txt[] = {
  1260. X  "                       ----------",
  1261. X  "                      /          \\",
  1262. X  "                     /    REST    \\",
  1263. X***************
  1264. X*** 23,28 ****
  1265. X--- 25,32 ----
  1266. X  0
  1267. X  };
  1268. X  
  1269. X+ char **rip;
  1270. X+ 
  1271. X  static void
  1272. X  center(line, text)
  1273. X  int line;
  1274. X***************
  1275. X*** 36,45 ****
  1276. X  
  1277. X  void
  1278. X  outrip(){
  1279. X!     register char **dp = rip;
  1280. X      register char *dpx;
  1281. X      char buf[BUFSZ];
  1282. X      register int x, y;
  1283. X  
  1284. X      cls();
  1285. X      Sprintf(buf, "%s", plname);
  1286. X--- 40,59 ----
  1287. X  
  1288. X  void
  1289. X  outrip(){
  1290. X!     register char **dp;
  1291. X      register char *dpx;
  1292. X      char buf[BUFSZ];
  1293. X      register int x, y;
  1294. X+     int killed_by_line = 0;
  1295. X+ 
  1296. X+     rip = dp = (char **) alloc(sizeof(rip_txt));
  1297. X+     if (!dp) return;
  1298. X+     for (x = 0; rip_txt[x]; x++) {
  1299. X+         dp[x] = (char *) alloc((unsigned int)(strlen(rip_txt[x]) + 1));
  1300. X+         if (!dp[x]) return;
  1301. X+         Strcpy(dp[x], rip_txt[x]);
  1302. X+     }
  1303. X+     dp[x] = (char *)0;
  1304. X  
  1305. X      cls();
  1306. X      Sprintf(buf, "%s", plname);
  1307. X***************
  1308. X*** 47,58 ****
  1309. X      center(6, buf);
  1310. X      Sprintf(buf, "%ld Au", u.ugold);
  1311. X      center(7, buf);
  1312. X!     Strcpy(buf, "killed by");
  1313. X!     if (islower(*killer) && strncmp(killer, "the ", 4) &&
  1314. X!         (strcmp(eos(killer)-4, "tion") || *(eos(killer)-5) == 'o') &&
  1315. X!         strcmp(killer, "contaminated water"))
  1316. X!         Strcat(buf, index(vowels, *killer) ? " an" : " a");
  1317. X!     center(8, buf);
  1318. X      Strcpy(buf, killer);
  1319. X      if(strlen(buf) > 16) {
  1320. X          register int i,i0,i1;
  1321. X--- 61,73 ----
  1322. X      center(6, buf);
  1323. X      Sprintf(buf, "%ld Au", u.ugold);
  1324. X      center(7, buf);
  1325. X!     if (killer_format != NO_KILLER_PREFIX) {
  1326. X!         killed_by_line = 1;
  1327. X!         Strcpy(buf, "killed by");
  1328. X!         if (killer_format == KILLED_BY_AN)
  1329. X!             Strcat(buf, index(vowels, *killer) ? " an" : " a");
  1330. X!         center(8, buf);
  1331. X!     }
  1332. X      Strcpy(buf, killer);
  1333. X      if(strlen(buf) > 16) {
  1334. X          register int i,i0,i1;
  1335. X***************
  1336. X*** 61,70 ****
  1337. X              if(buf[i] == ' ') i0 = i, i1 = i+1;
  1338. X          if(!i0) i0 = i1 = 16;
  1339. X          buf[i1 + 16] = 0;
  1340. X!         center(10, buf+i1);
  1341. X          buf[i0] = 0;
  1342. X      }
  1343. X!     center(9, buf);
  1344. X      Sprintf(buf, "%4d", getyear());
  1345. X      center(11, buf);
  1346. X      for(y=8; *dp; y++,dp++){
  1347. X--- 76,85 ----
  1348. X              if(buf[i] == ' ') i0 = i, i1 = i+1;
  1349. X          if(!i0) i0 = i1 = 16;
  1350. X          buf[i1 + 16] = 0;
  1351. X!         center(9 + killed_by_line, buf+i1);
  1352. X          buf[i0] = 0;
  1353. X      }
  1354. X!     center(8 + killed_by_line, buf);
  1355. X      Sprintf(buf, "%4d", getyear());
  1356. X      center(11, buf);
  1357. X      for(y=8; *dp; y++,dp++){
  1358. X*** src/Old/rnd.c    Mon Feb 19 18:57:04 1990
  1359. X--- src/rnd.c    Thu Jan 25 22:14:22 1990
  1360. X***************
  1361. X*** 17,22 ****
  1362. X--- 17,24 ----
  1363. X  #endif
  1364. X  #endif /* LINT */
  1365. X  
  1366. X+ #ifdef OVL2
  1367. X+ 
  1368. X  int
  1369. X  rn1(x,y)    /* y <= rn1(x,y) < (y+x) */
  1370. X  register int x, y;
  1371. X***************
  1372. X*** 24,29 ****
  1373. X--- 26,34 ----
  1374. X      return(RND(x)+y);
  1375. X  }
  1376. X  
  1377. X+ #endif /* OVL2 */
  1378. X+ #ifdef OVL0
  1379. X+ 
  1380. X  int
  1381. X  rn2(x)        /* 0 <= rn2(x) < x */
  1382. X  register int x;
  1383. X***************
  1384. X*** 37,44 ****
  1385. X      return(RND(x));
  1386. X  }
  1387. X  
  1388. X  int
  1389. X! rnl(x)        /* 0 <= rnl(x) < x; somtimes subtracting Luck */
  1390. X  register int x;    /* good luck approaches 0, bad luck approaches (x-1) */
  1391. X  {
  1392. X      register int i = RND(x);
  1393. X--- 42,52 ----
  1394. X      return(RND(x));
  1395. X  }
  1396. X  
  1397. X+ #endif /* OVL0 */
  1398. X+ #ifdef OVLB
  1399. X+ 
  1400. X  int
  1401. X! rnl(x)        /* 0 <= rnl(x) < x; sometimes subtracting Luck */
  1402. X  register int x;    /* good luck approaches 0, bad luck approaches (x-1) */
  1403. X  {
  1404. X      register int i = RND(x);
  1405. X***************
  1406. X*** 52,57 ****
  1407. X--- 60,68 ----
  1408. X      return i;
  1409. X  }
  1410. X  
  1411. X+ #endif /* OVLB */
  1412. X+ #ifdef OVL0
  1413. X+ 
  1414. X  int
  1415. X  rnd(x)        /* 1 <= rnd(x) <= x */
  1416. X  register int x;
  1417. X***************
  1418. X*** 65,70 ****
  1419. X--- 76,84 ----
  1420. X      return(RND(x)+1);
  1421. X  }
  1422. X  
  1423. X+ #endif /* OVL0 */
  1424. X+ #ifdef OVL1
  1425. X+ 
  1426. X  int
  1427. X  d(n,x)        /* n <= d(n,x) <= (n*x) */
  1428. X  register int n, x;
  1429. X***************
  1430. X*** 75,80 ****
  1431. X--- 89,97 ----
  1432. X      return(tmp);
  1433. X  }
  1434. X  
  1435. X+ #endif /* OVL1 */
  1436. X+ #ifdef OVLB
  1437. X+ 
  1438. X  int
  1439. X  rne(x)      /* by stewr 870807 */
  1440. X  register int x;
  1441. X***************
  1442. X*** 103,105 ****
  1443. X--- 120,124 ----
  1444. X      return((int)x);
  1445. X  }
  1446. X  #endif
  1447. X+ 
  1448. X+ #endif /* OVLB */
  1449. X*** src/Old/rumors.c    Mon Feb 19 18:57:18 1990
  1450. X--- src/rumors.c    Mon Jan 22 21:02:34 1990
  1451. X***************
  1452. X*** 22,28 ****
  1453. X  /* The oracle file consists of a number of multiple-line records, separated
  1454. X   * (but not terminated) by "-----" lines.
  1455. X   */
  1456. X! 
  1457. X  long first_rumor = sizeof(long);
  1458. X  long true_rumor_size, false_rumor_size, end_rumor_file;
  1459. X  #ifdef ORACLE
  1460. X--- 22,29 ----
  1461. X  /* The oracle file consists of a number of multiple-line records, separated
  1462. X   * (but not terminated) by "-----" lines.
  1463. X   */
  1464. X! static void NDECL(init_rumors);
  1465. X! static void NDECL(outoracle);
  1466. X  long first_rumor = sizeof(long);
  1467. X  long true_rumor_size, false_rumor_size, end_rumor_file;
  1468. X  #ifdef ORACLE
  1469. X***************
  1470. X*** 43,49 ****
  1471. X--- 44,56 ----
  1472. X      Strcat(tmp,RUMORFILE);
  1473. X      if(fp = fopen(tmp, "r")) {
  1474. X  #else
  1475. X+ # ifdef MACOS
  1476. X+     if(!(fp = fopen(RUMORFILE, "r")))
  1477. X+         fp = openFile(RUMORFILE, "r");
  1478. X+     if (fp) {
  1479. X+ # else
  1480. X      if(fp = fopen(RUMORFILE, "r")) {
  1481. X+ # endif
  1482. X  #endif
  1483. X          (void) fread((genericptr_t)&true_rumor_size,sizeof(long),1,fp);
  1484. X          (void) fseek(fp, 0L, 2);
  1485. X***************
  1486. X*** 67,73 ****
  1487. X--- 74,86 ----
  1488. X      Strcat(tmp,ORACLEFILE);
  1489. X      if(fp = fopen(tmp, "r")) {
  1490. X  #else
  1491. X+ # ifdef MACOS
  1492. X+     if(!(fp = fopen(ORACLEFILE, "r")))
  1493. X+         fp = openFile(ORACLEFILE, "r");
  1494. X+     if (fp) {
  1495. X+ # else
  1496. X      if(fp = fopen(ORACLEFILE, "r")) {
  1497. X+ # endif
  1498. X  #endif
  1499. X          (void) fseek(fp, 0L, 2);
  1500. X          oracle_size = ftell(fp);
  1501. X***************
  1502. X*** 112,118 ****
  1503. X      if(rumors = fopen(tmp, "r")) {
  1504. X  #else
  1505. X  # ifdef MACOS
  1506. X!     if(rumors = fopen(RUMORFILE, "r"))
  1507. X          rumors = openFile(RUMORFILE, "r");
  1508. X      if (rumors) {
  1509. X  # else
  1510. X--- 125,131 ----
  1511. X      if(rumors = fopen(tmp, "r")) {
  1512. X  #else
  1513. X  # ifdef MACOS
  1514. X!     if(!(rumors = fopen(RUMORFILE, "r")))
  1515. X          rumors = openFile(RUMORFILE, "r");
  1516. X      if (rumors) {
  1517. X  # else
  1518. X***************
  1519. X*** 131,136 ****
  1520. X--- 144,153 ----
  1521. X              case -1: beginning = first_rumor + true_rumor_size;
  1522. X              tidbit = true_rumor_size + Rand() % false_rumor_size;
  1523. X              break;
  1524. X+             default:
  1525. X+             impossible("strange truth value for rumor");
  1526. X+             tidbit = 0; beginning = first_rumor;
  1527. X+             break;
  1528. X          }
  1529. X          (void) fseek(rumors, first_rumor + tidbit, 0);
  1530. X          (void) fgets(line, COLNO, rumors);
  1531. X***************
  1532. X*** 176,182 ****
  1533. X      if(oracles = fopen(tmp, "r")) {
  1534. X  #else
  1535. X  # ifdef MACOS
  1536. X!     if(oracles = fopen(ORACLEFILE, "r"))
  1537. X          oracles = openFile(ORACLEFILE, "r");
  1538. X      if (oracles) {
  1539. X  # else
  1540. X--- 193,199 ----
  1541. X      if(oracles = fopen(tmp, "r")) {
  1542. X  #else
  1543. X  # ifdef MACOS
  1544. X!     if(!(oracles = fopen(ORACLEFILE, "r")))
  1545. X          oracles = openFile(ORACLEFILE, "r");
  1546. X      if (oracles) {
  1547. X  # else
  1548. X*** src/Old/save.c    Mon Feb 19 18:57:35 1990
  1549. X--- src/save.c    Fri Feb 16 22:07:43 1990
  1550. X***************
  1551. X*** 2,9 ****
  1552. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1553. X  /* NetHack may be freely redistributed.  See license for details. */
  1554. X  
  1555. X  /* block some unused #defines to avoid overloading some cpp's */
  1556. X- #define MONATTK_H
  1557. X  #include "hack.h"
  1558. X  #include "lev.h"
  1559. X  
  1560. X--- 2,9 ----
  1561. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1562. X  /* NetHack may be freely redistributed.  See license for details. */
  1563. X  
  1564. X+ #define MONATTK_H    /* comment line for pre-compiled headers */
  1565. X  /* block some unused #defines to avoid overloading some cpp's */
  1566. X  #include "hack.h"
  1567. X  #include "lev.h"
  1568. X  
  1569. X***************
  1570. X*** 14,26 ****
  1571. X  #ifndef NO_SIGNAL
  1572. X  #include <signal.h>
  1573. X  #endif /* !NO_SIGNAL */
  1574. X! #if defined(EXPLORE_MODE) && !defined(LSC) && !defined(O_RDONLY)
  1575. X  #include <fcntl.h>
  1576. X  #endif /* EXPLORE_MODE */
  1577. X  
  1578. X  boolean hu;        /* set during hang-up */
  1579. X  
  1580. X! #if defined(DGK) && !defined(OLD_TOS)
  1581. X  struct finfo fileinfo[MAXLEVEL+1];
  1582. X  long bytes_counted;
  1583. X  int count_only;
  1584. X--- 14,26 ----
  1585. X  #ifndef NO_SIGNAL
  1586. X  #include <signal.h>
  1587. X  #endif /* !NO_SIGNAL */
  1588. X! #if defined(EXPLORE_MODE) && !defined(LSC) && !defined(O_RDONLY) && !defined(AZTEC_C)
  1589. X  #include <fcntl.h>
  1590. X  #endif /* EXPLORE_MODE */
  1591. X  
  1592. X  boolean hu;        /* set during hang-up */
  1593. X  
  1594. X! #if defined(DGK)
  1595. X  struct finfo fileinfo[MAXLEVEL+1];
  1596. X  long bytes_counted;
  1597. X  int count_only;
  1598. X***************
  1599. X*** 28,66 ****
  1600. X  boolean level_exists[MAXLEVEL+1];
  1601. X  #endif
  1602. X  
  1603. X! #if defined(DGK) && !defined(OLD_TOS)
  1604. X  static void savelev0();
  1605. X! #endif /* DGK && !OLD_TOS */
  1606. X  static void saveobjchn();
  1607. X  static void savemonchn();
  1608. X  static void savegoldchn();
  1609. X  static void savetrapchn();
  1610. X  static void savegenoinfo();
  1611. X! #if defined(DGK) && !defined(OLD_TOS)
  1612. X  static boolean swapout_oldest();
  1613. X  static void copyfile();
  1614. X! #endif /* defined(DGK) && !defined(OLD_TOS) */
  1615. X  static void spill_objs();
  1616. X  
  1617. X  int
  1618. X  dosave(){
  1619. X      clrlin();
  1620. X      pline("Really save? ");    /* especially useful if COMPRESS defined */
  1621. X      if(yn() == 'n') {
  1622. X          clrlin();
  1623. X          (void) fflush(stdout);
  1624. X          if(multi > 0) nomul(0);
  1625. X      } else {
  1626. X- #ifdef EXPLORE_MODE
  1627. X- # ifdef WIZARD
  1628. X-         if(!discover && !wizard) {
  1629. X- # else
  1630. X-         if(!discover) {
  1631. X- # endif
  1632. X-     pline("Do you want to create a non-scoring, restartable save file? ");
  1633. X-             if(yn() == 'y')  discover = TRUE;
  1634. X-         }
  1635. X- #endif
  1636. X          clear_screen();
  1637. X          (void) fflush(stdout);
  1638. X          hu = FALSE;
  1639. X--- 28,66 ----
  1640. X  boolean level_exists[MAXLEVEL+1];
  1641. X  #endif
  1642. X  
  1643. X! #if defined(DGK)
  1644. X  static void savelev0();
  1645. X! #endif /* DGK */
  1646. X  static void saveobjchn();
  1647. X  static void savemonchn();
  1648. X  static void savegoldchn();
  1649. X  static void savetrapchn();
  1650. X  static void savegenoinfo();
  1651. X! #if defined(DGK)
  1652. X  static boolean swapout_oldest();
  1653. X  static void copyfile();
  1654. X! #endif /* defined(DGK) */
  1655. X  static void spill_objs();
  1656. X+ #ifdef __GNULINT__
  1657. X+ static long nulls[10];
  1658. X+ #else
  1659. X+ #define nulls nul
  1660. X+ #endif
  1661. X  
  1662. X  int
  1663. X  dosave(){
  1664. X      clrlin();
  1665. X+ #ifdef MACOS
  1666. X+     if(!flags.silent) SysBeep(1);
  1667. X+     if(UseMacAlertText(128, "Really save ?") != 1) {
  1668. X+ #else
  1669. X      pline("Really save? ");    /* especially useful if COMPRESS defined */
  1670. X      if(yn() == 'n') {
  1671. X+ #endif
  1672. X          clrlin();
  1673. X          (void) fflush(stdout);
  1674. X          if(multi > 0) nomul(0);
  1675. X      } else {
  1676. X          clear_screen();
  1677. X          (void) fflush(stdout);
  1678. X          hu = FALSE;
  1679. X***************
  1680. X*** 93,99 ****
  1681. X      register int fd, ofd;
  1682. X      int tmp;        /* not register ! */
  1683. X      xchar ltmp;
  1684. X! #if defined(DGK) && !defined(OLD_TOS)
  1685. X      long fds, needed;
  1686. X      int mode;
  1687. X  #endif
  1688. X--- 93,99 ----
  1689. X      register int fd, ofd;
  1690. X      int tmp;        /* not register ! */
  1691. X      xchar ltmp;
  1692. X! #if defined(DGK)
  1693. X      long fds, needed;
  1694. X      int mode;
  1695. X  #endif
  1696. X***************
  1697. X*** 110,116 ****
  1698. X  #if defined(UNIX) || defined(VMS)
  1699. X      (void) signal(SIGHUP, SIG_IGN);
  1700. X  #endif
  1701. X! #if !defined(__TURBOC__) && !defined(OLD_TOS) && !defined(NO_SIGNAL)
  1702. X      (void) signal(SIGINT, SIG_IGN);
  1703. X  #endif
  1704. X  
  1705. X--- 110,116 ----
  1706. X  #if defined(UNIX) || defined(VMS)
  1707. X      (void) signal(SIGHUP, SIG_IGN);
  1708. X  #endif
  1709. X! #if !defined(__TURBOC__) && !defined(NO_SIGNAL)
  1710. X      (void) signal(SIGINT, SIG_IGN);
  1711. X  #endif
  1712. X  
  1713. X***************
  1714. X*** 120,127 ****
  1715. X  # endif
  1716. X  # ifdef EXPLORE_MODE
  1717. X      if(!hu) {
  1718. X! 
  1719. X!         fd = open(SAVEF, O_RDONLY);
  1720. X          if (fd > 0) {
  1721. X          (void) close(fd);
  1722. X          clrlin();
  1723. X--- 120,130 ----
  1724. X  # endif
  1725. X  # ifdef EXPLORE_MODE
  1726. X      if(!hu) {
  1727. X! #  ifdef AMIGA_WBENCH
  1728. X!         (fd = ami_wbench_getsave(O_RDONLY));
  1729. X! #  else
  1730. X!         (fd = open(SAVEF, O_RDONLY));
  1731. X! #  endif
  1732. X          if (fd > 0) {
  1733. X          (void) close(fd);
  1734. X          clrlin();
  1735. X***************
  1736. X*** 133,139 ****
  1737. X  # ifdef TOS
  1738. X      fd = creat(SAVEF, FCMASK);
  1739. X  # else
  1740. X!     fd = open(SAVEF, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, FCMASK);
  1741. X  # endif
  1742. X  #else /* MSDOS */
  1743. X  # ifdef EXPLORE_MODE
  1744. X--- 136,146 ----
  1745. X  # ifdef TOS
  1746. X      fd = creat(SAVEF, FCMASK);
  1747. X  # else
  1748. X! #  ifdef AMIGA_WBENCH
  1749. X!     fd=ami_wbench_getsave(O_WRONLY | O_CREAT | O_TRUNC);
  1750. X! #  else
  1751. X!     (fd = open(SAVEF, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, FCMASK));
  1752. X! #  endif
  1753. X  # endif
  1754. X  #else /* MSDOS */
  1755. X  # ifdef EXPLORE_MODE
  1756. X***************
  1757. X*** 183,188 ****
  1758. X--- 190,198 ----
  1759. X  #endif /* MSDOS */
  1760. X      if(fd < 0) {
  1761. X          if(!hu) pline("Cannot open save file.");
  1762. X+ #ifdef AMIGA_WBENCH
  1763. X+         ami_wbench_unlink(SAVEF);
  1764. X+ #endif
  1765. X          (void) unlink(SAVEF);        /* ab@unido */
  1766. X          return(0);
  1767. X      }
  1768. X***************
  1769. X*** 193,199 ****
  1770. X          change_luck(-1);        /* and unido!ab */
  1771. X      home();
  1772. X      cl_end();
  1773. X! #if defined(DGK) && !defined(OLD_TOS)
  1774. X      if(!hu) msmsg("Saving: ");
  1775. X      mode = COUNT;
  1776. X  again:
  1777. X--- 203,209 ----
  1778. X          change_luck(-1);        /* and unido!ab */
  1779. X      home();
  1780. X      cl_end();
  1781. X! #if defined(DGK)
  1782. X      if(!hu) msmsg("Saving: ");
  1783. X      mode = COUNT;
  1784. X  again:
  1785. X***************
  1786. X*** 235,241 ****
  1787. X      bwrite(fd, (genericptr_t) &is_maze_lev, sizeof is_maze_lev);
  1788. X      bwrite(fd, (genericptr_t) &u, sizeof(struct you));
  1789. X  #ifdef SPELLS
  1790. X!     bwrite(fd, (genericptr_t) spl_book, sizeof(struct spell) * (MAXSPELL + 1));
  1791. X  #endif
  1792. X      if(u.ustuck)
  1793. X          bwrite(fd, (genericptr_t) &(u.ustuck->m_id), sizeof u.ustuck->m_id);
  1794. X--- 245,256 ----
  1795. X      bwrite(fd, (genericptr_t) &is_maze_lev, sizeof is_maze_lev);
  1796. X      bwrite(fd, (genericptr_t) &u, sizeof(struct you));
  1797. X  #ifdef SPELLS
  1798. X!     bwrite(fd, (genericptr_t) spl_book, 
  1799. X!                 sizeof(struct spell) * (MAXSPELL + 1));
  1800. X! #endif
  1801. X! #ifdef NAMED_ITEMS
  1802. X!     bwrite(fd, (genericptr_t) artiexist, 
  1803. X!                 (unsigned)(sizeof(boolean) * artifact_num));
  1804. X  #endif
  1805. X      if(u.ustuck)
  1806. X          bwrite(fd, (genericptr_t) &(u.ustuck->m_id), sizeof u.ustuck->m_id);
  1807. X***************
  1808. X*** 246,252 ****
  1809. X      savefruitchn(fd);
  1810. X  #endif
  1811. X      savenames(fd);
  1812. X! #if defined(DGK) && !defined(OLD_TOS)
  1813. X      if (mode == COUNT) {
  1814. X  # ifdef ZEROCOMP
  1815. X          bflush(fd);
  1816. X--- 261,267 ----
  1817. X      savefruitchn(fd);
  1818. X  #endif
  1819. X      savenames(fd);
  1820. X! #if defined(DGK)
  1821. X      if (mode == COUNT) {
  1822. X  # ifdef ZEROCOMP
  1823. X          bflush(fd);
  1824. X***************
  1825. X*** 256,261 ****
  1826. X--- 271,279 ----
  1827. X          for (ltmp = 1; ltmp <= maxdlevel; ltmp++)
  1828. X              if (ltmp != dlevel && fileinfo[ltmp].where)
  1829. X                  needed += fileinfo[ltmp].size + (sizeof ltmp);
  1830. X+ #ifdef AMIGA_WBENCH
  1831. X+         needed+=ami_wbench_iconsize(SAVEF);
  1832. X+ #endif
  1833. X          fds = freediskspace(SAVEF);
  1834. X          if(needed > fds) {
  1835. X              if(!hu) {
  1836. X***************
  1837. X*** 264,269 ****
  1838. X--- 282,290 ----
  1839. X                  fds);
  1840. X              }
  1841. X              flushout();
  1842. X+ #ifdef AMIGA_WBENCH
  1843. X+             ami_wbench_unlink(SAVEF);
  1844. X+ #endif
  1845. X              (void) close(fd);
  1846. X              (void) unlink(SAVEF);
  1847. X              return 0;
  1848. X***************
  1849. X*** 273,279 ****
  1850. X      }
  1851. X  #endif
  1852. X      for(ltmp = (xchar)1; ltmp <= maxdlevel; ltmp++) {
  1853. X! #if defined(DGK) && !defined(OLD_TOS)
  1854. X          if (ltmp == dlevel || !fileinfo[ltmp].where) continue;
  1855. X          if (fileinfo[ltmp].where != ACTIVE)
  1856. X              swapin_file(ltmp);
  1857. X--- 294,300 ----
  1858. X      }
  1859. X  #endif
  1860. X      for(ltmp = (xchar)1; ltmp <= maxdlevel; ltmp++) {
  1861. X! #if defined(DGK)
  1862. X          if (ltmp == dlevel || !fileinfo[ltmp].where) continue;
  1863. X          if (fileinfo[ltmp].where != ACTIVE)
  1864. X              swapin_file(ltmp);
  1865. X***************
  1866. X*** 294,299 ****
  1867. X--- 315,323 ----
  1868. X              (void)SetVol(0L, savenum);
  1869. X  #endif
  1870. X              (void) unlink(SAVEF);
  1871. X+ #ifdef AMIGA_WBENCH
  1872. X+             ami_wbench_unlink(SAVEF);
  1873. X+ #endif
  1874. X              if(!hu) done(TRICKED);
  1875. X              return(0);
  1876. X          }
  1877. X***************
  1878. X*** 303,309 ****
  1879. X          getlev(ofd, hackpid, ltmp, FALSE);
  1880. X          (void) close(ofd);
  1881. X          bwrite(fd, (genericptr_t) <mp, sizeof ltmp);  /* level number */
  1882. X! #if defined(DGK) && !defined(OLD_TOS)
  1883. X          savelev(fd, ltmp, WRITE);            /* actual level */
  1884. X  #else
  1885. X          savelev(fd, ltmp);            /* actual level */
  1886. X--- 327,333 ----
  1887. X          getlev(ofd, hackpid, ltmp, FALSE);
  1888. X          (void) close(ofd);
  1889. X          bwrite(fd, (genericptr_t) <mp, sizeof ltmp);  /* level number */
  1890. X! #if defined(DGK)
  1891. X          savelev(fd, ltmp, WRITE);            /* actual level */
  1892. X  #else
  1893. X          savelev(fd, ltmp);            /* actual level */
  1894. X***************
  1895. X*** 328,337 ****
  1896. X      Strcat(cmd, SAVEF);
  1897. X      (void) system(cmd);
  1898. X  #endif
  1899. X      return(1);
  1900. X  }
  1901. X  
  1902. X! #if defined(DGK) && !defined(OLD_TOS)
  1903. X  boolean
  1904. X  savelev(fd, lev, mode)
  1905. X  int fd;
  1906. X--- 352,364 ----
  1907. X      Strcat(cmd, SAVEF);
  1908. X      (void) system(cmd);
  1909. X  #endif
  1910. X+ #ifdef AMIGA_WBENCH
  1911. X+     ami_wbench_iconwrite(SAVEF);
  1912. X+ #endif
  1913. X      return(1);
  1914. X  }
  1915. X  
  1916. X! #if defined(DGK)
  1917. X  boolean
  1918. X  savelev(fd, lev, mode)
  1919. X  int fd;
  1920. X***************
  1921. X*** 385,391 ****
  1922. X  #endif
  1923. X  
  1924. X      if(fd < 0) panic("Save on bad file!");    /* impossible */
  1925. X! #if !defined(DGK) || defined(OLD_TOS)
  1926. X      if(lev >= 0 && lev <= MAXLEVEL)
  1927. X          level_exists[lev] = TRUE;
  1928. X  #endif
  1929. X--- 412,418 ----
  1930. X  #endif
  1931. X  
  1932. X      if(fd < 0) panic("Save on bad file!");    /* impossible */
  1933. X! #if !defined(DGK)
  1934. X      if(lev >= 0 && lev <= MAXLEVEL)
  1935. X          level_exists[lev] = TRUE;
  1936. X  #endif
  1937. X***************
  1938. X*** 430,438 ****
  1939. X           * the display of the screen when the game is restored under
  1940. X           * a potentially different value of showsyms from the
  1941. X           * environment */
  1942. X!         /* if a game is saved off the rogue level, the usual showsyms
  1943. X!          * will be written out for the rogue level too, but they will
  1944. X!          * be ignored on restore so it doesn't matter */
  1945. X          bwrite(fd, (genericptr_t) savesyms, sizeof savesyms);
  1946. X      else
  1947. X  #endif
  1948. X--- 457,465 ----
  1949. X           * the display of the screen when the game is restored under
  1950. X           * a potentially different value of showsyms from the
  1951. X           * environment */
  1952. X!         /* if a game is saved while not on rogue level, the usual
  1953. X!          * showsyms will be written out for the rogue level too, but
  1954. X!          * they will be ignored on restore so it doesn't matter */
  1955. X          bwrite(fd, (genericptr_t) savesyms, sizeof savesyms);
  1956. X      else
  1957. X  #endif
  1958. X***************
  1959. X*** 466,472 ****
  1960. X          for(wtmp = wsegs[tmp]; wtmp; wtmp = wtmp->nseg){
  1961. X              bwrite(fd,(genericptr_t) wtmp,sizeof(struct wseg));
  1962. X          }
  1963. X! #if defined(DGK) && !defined(OLD_TOS)
  1964. X          if (!count_only)
  1965. X  #endif
  1966. X              wsegs[tmp] = 0;
  1967. X--- 493,499 ----
  1968. X          for(wtmp = wsegs[tmp]; wtmp; wtmp = wtmp->nseg){
  1969. X              bwrite(fd,(genericptr_t) wtmp,sizeof(struct wseg));
  1970. X          }
  1971. X! #if defined(DGK)
  1972. X          if (!count_only)
  1973. X  #endif
  1974. X              wsegs[tmp] = 0;
  1975. X***************
  1976. X*** 473,479 ****
  1977. X      }
  1978. X      bwrite(fd,(genericptr_t) wgrowtime,sizeof(wgrowtime));
  1979. X  #endif /* WORM /**/
  1980. X! #if defined(DGK) && !defined(OLD_TOS)
  1981. X      if (count_only)    return;
  1982. X  #endif
  1983. X      billobjs = 0;
  1984. X--- 500,506 ----
  1985. X      }
  1986. X      bwrite(fd,(genericptr_t) wgrowtime,sizeof(wgrowtime));
  1987. X  #endif /* WORM /**/
  1988. X! #if defined(DGK)
  1989. X      if (count_only)    return;
  1990. X  #endif
  1991. X      billobjs = 0;
  1992. X***************
  1993. X*** 522,528 ****
  1994. X        flushoutrun(outrunlength);
  1995. X        }
  1996. X        if (outbufp) {
  1997. X! #if defined(DGK) && !defined(OLD_TOS)
  1998. X        if (!count_only)    /* flush buffer */
  1999. X  #endif
  2000. X            (void) write(fd, outbuf, outbufp);
  2001. X--- 549,555 ----
  2002. X        flushoutrun(outrunlength);
  2003. X        }
  2004. X        if (outbufp) {
  2005. X! #if defined(DGK)
  2006. X        if (!count_only)    /* flush buffer */
  2007. X  #endif
  2008. X            (void) write(fd, outbuf, outbufp);
  2009. X***************
  2010. X*** 560,566 ****
  2011. X  register genericptr_t loc;
  2012. X  register unsigned num;
  2013. X  {
  2014. X! #if defined(DGK) && !defined(OLD_TOS)
  2015. X      bytes_counted += num;
  2016. X      if (!count_only)
  2017. X  #endif
  2018. X--- 587,593 ----
  2019. X  register genericptr_t loc;
  2020. X  register unsigned num;
  2021. X  {
  2022. X! #if defined(DGK)
  2023. X      bytes_counted += num;
  2024. X      if (!count_only)
  2025. X  #endif
  2026. X***************
  2027. X*** 593,599 ****
  2028. X          xl = otmp->onamelth;
  2029. X          bwrite(fd, (genericptr_t) &xl, sizeof(int));
  2030. X          bwrite(fd, (genericptr_t) otmp, xl + sizeof(struct obj));
  2031. X! #if defined(DGK) && !defined(OLD_TOS)
  2032. X          if (!count_only)
  2033. X  #endif
  2034. X          free((genericptr_t) otmp);
  2035. X--- 620,626 ----
  2036. X          xl = otmp->onamelth;
  2037. X          bwrite(fd, (genericptr_t) &xl, sizeof(int));
  2038. X          bwrite(fd, (genericptr_t) otmp, xl + sizeof(struct obj));
  2039. X! #if defined(DGK)
  2040. X          if (!count_only)
  2041. X  #endif
  2042. X          free((genericptr_t) otmp);
  2043. X***************
  2044. X*** 620,626 ****
  2045. X          bwrite(fd, (genericptr_t) &xl, sizeof(int));
  2046. X          bwrite(fd, (genericptr_t) mtmp, xl + sizeof(struct monst));
  2047. X          if(mtmp->minvent) saveobjchn(fd,mtmp->minvent);
  2048. X! #if defined(DGK) && !defined(OLD_TOS)
  2049. X          if (!count_only)
  2050. X  #endif
  2051. X          free((genericptr_t) mtmp);
  2052. X--- 647,653 ----
  2053. X          bwrite(fd, (genericptr_t) &xl, sizeof(int));
  2054. X          bwrite(fd, (genericptr_t) mtmp, xl + sizeof(struct monst));
  2055. X          if(mtmp->minvent) saveobjchn(fd,mtmp->minvent);
  2056. X! #if defined(DGK)
  2057. X          if (!count_only)
  2058. X  #endif
  2059. X          free((genericptr_t) mtmp);
  2060. X***************
  2061. X*** 638,650 ****
  2062. X      while(gold) {
  2063. X          gold2 = gold->ngold;
  2064. X          bwrite(fd, (genericptr_t) gold, sizeof(struct gold));
  2065. X! #if defined(DGK) && !defined(OLD_TOS)
  2066. X          if (!count_only)
  2067. X  #endif
  2068. X              free((genericptr_t) gold);
  2069. X          gold = gold2;
  2070. X      }
  2071. X!     bwrite(fd, (genericptr_t)nul, sizeof(struct gold));
  2072. X  }
  2073. X  
  2074. X  static void
  2075. X--- 665,677 ----
  2076. X      while(gold) {
  2077. X          gold2 = gold->ngold;
  2078. X          bwrite(fd, (genericptr_t) gold, sizeof(struct gold));
  2079. X! #if defined(DGK)
  2080. X          if (!count_only)
  2081. X  #endif
  2082. X              free((genericptr_t) gold);
  2083. X          gold = gold2;
  2084. X      }
  2085. X!     bwrite(fd, (genericptr_t)nulls, sizeof(struct gold));
  2086. X  }
  2087. X  
  2088. X  static void
  2089. X***************
  2090. X*** 656,668 ****
  2091. X      while(trap) {
  2092. X          trap2 = trap->ntrap;
  2093. X          bwrite(fd, (genericptr_t) trap, sizeof(struct trap));
  2094. X! #if defined(DGK) && !defined(OLD_TOS)
  2095. X          if (!count_only)
  2096. X  #endif
  2097. X              free((genericptr_t) trap);
  2098. X          trap = trap2;
  2099. X      }
  2100. X!     bwrite(fd, (genericptr_t)nul, sizeof(struct trap));
  2101. X  }
  2102. X  
  2103. X  #ifdef TUTTI_FRUTTI
  2104. X--- 683,695 ----
  2105. X      while(trap) {
  2106. X          trap2 = trap->ntrap;
  2107. X          bwrite(fd, (genericptr_t) trap, sizeof(struct trap));
  2108. X! #if defined(DGK)
  2109. X          if (!count_only)
  2110. X  #endif
  2111. X              free((genericptr_t) trap);
  2112. X          trap = trap2;
  2113. X      }
  2114. X!     bwrite(fd, (genericptr_t)nulls, sizeof(struct trap));
  2115. X  }
  2116. X  
  2117. X  #ifdef TUTTI_FRUTTI
  2118. X***************
  2119. X*** 683,695 ****
  2120. X          if (f1->fid >= 0) {
  2121. X              bwrite(fd, (genericptr_t) f1, sizeof(struct fruit));
  2122. X          }
  2123. X! #if defined(DGK) && !defined(OLD_TOS)
  2124. X          if (!count_only)
  2125. X  #endif
  2126. X              free((genericptr_t) f1);
  2127. X          f1 = f2;
  2128. X      }
  2129. X!     bwrite(fd, (genericptr_t)nul, sizeof(struct fruit));
  2130. X  }
  2131. X  #endif
  2132. X  
  2133. X--- 710,722 ----
  2134. X          if (f1->fid >= 0) {
  2135. X              bwrite(fd, (genericptr_t) f1, sizeof(struct fruit));
  2136. X          }
  2137. X! #if defined(DGK)
  2138. X          if (!count_only)
  2139. X  #endif
  2140. X              free((genericptr_t) f1);
  2141. X          f1 = f2;
  2142. X      }
  2143. X!     bwrite(fd, (genericptr_t)nulls, sizeof(struct fruit));
  2144. X  }
  2145. X  #endif
  2146. X  
  2147. X***************
  2148. X*** 703,709 ****
  2149. X          bwrite(fd, (genericptr_t) &(mons[i].geno), sizeof(unsigned));
  2150. X  }
  2151. X  
  2152. X! #if defined(DGK) && !defined(OLD_TOS)
  2153. X  boolean
  2154. X  swapin_file(lev)
  2155. X  int lev;
  2156. X--- 730,736 ----
  2157. X          bwrite(fd, (genericptr_t) &(mons[i].geno), sizeof(unsigned));
  2158. X  }
  2159. X  
  2160. X! #if defined(DGK)
  2161. X  boolean
  2162. X  swapin_file(lev)
  2163. X  int lev;
  2164. X***************
  2165. X*** 808,814 ****
  2166. X  {
  2167. X      register struct obj *otmp, *otmp2, *probj;
  2168. X  
  2169. X! #ifdef LINT
  2170. X      probj = (struct obj *)0;    /* suppress "used before set" error */
  2171. X  #endif
  2172. X      for(otmp = fcobj; otmp; otmp = otmp2) {
  2173. X--- 835,841 ----
  2174. X  {
  2175. X      register struct obj *otmp, *otmp2, *probj;
  2176. X  
  2177. X! #if defined(LINT) || defined(__GNULINT__)
  2178. X      probj = (struct obj *)0;    /* suppress "used before set" error */
  2179. X  #endif
  2180. X      for(otmp = fcobj; otmp; otmp = otmp2) {
  2181. X
  2182. END_OF_FILE
  2183. if test 53513 -ne `wc -c <'patch7.07'`; then
  2184.     echo shar: \"'patch7.07'\" unpacked with wrong size!
  2185. fi
  2186. # end of 'patch7.07'
  2187. echo shar: End of archive 17 \(of 30\).
  2188. cp /dev/null ark17isdone
  2189. MISSING=""
  2190. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do
  2191.     if test ! -f ark${I}isdone ; then
  2192.     MISSING="${MISSING} ${I}"
  2193.     fi
  2194. done
  2195. if test "${MISSING}" = "" ; then
  2196.     echo You have unpacked all 30 archives.
  2197.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2198. else
  2199.     echo You still need to unpack the following archives:
  2200.     echo "        " ${MISSING}
  2201. fi
  2202. ##  End of shell archive.
  2203. exit 0
  2204.